public class User {
    private String name;

    public User() {
        System.out.println("Bean的第一步：实例化");
    }

    public void setName(String name) {
        this.name = name;
        System.out.println("Bean的第二步：设置属性");
    }
    public void initBean() {
        System.out.println("Bean的第四步：初始化");
    }
    public void destroyBean() {
        System.out.println("Bean的第七步：销毁");
    }
}
